/*
 * Vent_Foto.java
 *
 * Created on 11 de marzo de 2006, 11:39
 */

package administrador;

/**
 *
 * @author  daniel1
 */
public class Vent_Foto extends javax.swing.JFrame {
    int Codigo;
    /** Creates new form Vent_Foto */
    public Vent_Foto(int codigo) {
        //Codigo del del Producto a Visualizar
        Codigo=codigo;
        initComponents();
        setVisible(true);
        poneFoto();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setForeground(new java.awt.Color(204, 204, 255));
        jLabel1.setBackground(new java.awt.Color(204, 204, 255));
        getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);

        pack();
    }
    // </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(final int cod_Producto) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Vent_Foto(cod_Producto).setVisible(true);
            }
        });
    }
    public void poneFoto(){
    
      setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
      javax.swing.ImageIcon imagen=new javax.swing.ImageIcon("C:\\Documents and Settings\\User\\Mis documentos\\Mis imagenes\\imagenesDany\\img_big\\"+Codigo+".jpg");
      int ancho=imagen.getIconWidth();
      int alto=imagen.getIconHeight();
      setBounds(100,100, ancho+10,alto+45);
      jLabel1.setIcon(imagen);
      jLabel1.repaint();
      getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);

    
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
    
}
